<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
<title>飞腾会-FitaClub</title>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>
</head>
<!-- end header -->

<body>
  <div class="page-group">
    <div class="page page-current bg-light-gray">
      <header class="bar bar-nav fita-header">
        <!-- <a href="javascript:history.back(-1);" class="icon icon-left pull-left"></a> -->
        <!-- <a class="icon iconfont iconfont-menu pull-right"></a> -->
        <a href="javascript:void(0);" class="icon icon-menu pull-right open-panel"></a>
        <h1 class="title">Alamo租车</h1>
      </header>
      <div class="bar bar-footer fita-footer">
        <a href="" class="button submit-button">查找可用车辆</a>
      </div>
      
      <div class="content">
        <form method="get" action="${ctx.host}/cars">
          <input type="hidden" name="filter" value="true">
          <c:if test="${empty cookie['fita-mobile'].value}">
              <input type="hidden" name="login" value="false">
          </c:if>
          <div class="banner">
            <img src="${ctx.resource}/images/cars/cars-banner.png" alt=""/>
          </div>
          <div class="card cars-card-layout">
            <div class="card-content">
              <div class="card-content-inner">
                <h1 class="cars-title text-center">租车查询 <span class="iconfont iconfont-location" style="margin-left: .5rem;"></span></h1>
                <div class="list-block cars-form">
                  <div class="row no-gutter item ">
                    <div class="col-50">
                      <p class="name">国家</p>
                      <a href="#" class="item-input open-popup" data-popup=".city-popup" style="display: block;">
                        <input type="text" class="selected-val" name="countryName" value="北美" placeholder="请选择国家" readonly>
                        <input type="hidden" class="selected-id" name="countryId" value="93">
                        <input type="hidden" class="selected-id" name="countryCode" value="US,CA">
                      </a>
                    </div>
                    <div class="col-50 brand-item">
                      <p class="name">品牌</p>
                      <div class="item-input">
                        <input type="text" id='brand' placeholder="选择品牌" value="爱路美" />
                        <input type="hidden" name="supplierId" value="2" />
                      </div>
                    </div>
                  </div>
                  <div class="row no-gutter item">
                    <div class="col-50">
                      <p class="name">取车地点</p>
                      <a href="#" class="item-input pickup" style="display: block;">
                        <input type="text" class="pick-up-val picklocation-val" placeholder="请选择" value="" readonly>
                        <input type="hidden" class="pick-up-id picklocation-id" name="pickupLocation" value="13427">
                      </a>
                    </div>
                    <div class="col-50">
                      <p class="name">还车地点</p>
                      <a href="#" class="item-input dropoff" style="display: block;">
                        <input type="text" class="drop-off-val picklocation-val" placeholder="请选择" value="" readonly>
                        <input type="hidden" class="drop-off-id picklocation-id" name="returnLocation" value="13427">
                      </a>
                    </div>
                  </div>
                  <div class="row no-gutter item">
                    <div class="col-50 pick-up-layout">
                      <p class="name"></p>
                      <div class="item-input">
                        <input type="text" class='pick-up-datetime' style="position: absolute; top: 0; left: 0; opacity: 0;" readonly>
                        <input type="hidden" name="pickupDate" value="" class="time">
                        <span class="time-box" style="height: 2.15rem; "></span>
                      </div>
                    </div>
                    <div class="col-50 drop-off-layout">
                      <p class="name"></p>
                       <div class="item-input">
                        <input type="text" class='pick-up-datetime drop-off-datetime' style="position: absolute; top: 0; left: 0; opacity: 0;" readonly>
                        <input type="hidden" name="returnDate" value="" class="time">
                        <span class="time-box" style="height: 2.15rem; "></span>
                      </div>
                    </div>
                    <%-- <div class="col-50">
                      <p class="name">${startString}</p>
                      <div class="item-input">
                        <input type="text" class='pick-up-datetime' style="position: absolute; top: 0; left: 0; opacity: 0;">
                        <input type="hidden" name="pickupDate" value="${start}" class="time">
                        <span class="time-box" style="height: 2.15rem; ">${startTimeString}</span>
                      </div>
                    </div>
                    <div class="col-50">
                      <p class="name">${endString}</p>
                       <div class="item-input">
                        <input type="text" class='pick-up-datetime drop-off-datetime' style="position: absolute; top: 0; left: 0; opacity: 0;">
                        <input type="hidden" name="returnDate" value="${end}" class="time">
                        <span class="time-box" style="height: 2.15rem; ">${endTimeString}</span>
                      </div>
                    </div> --%>
                  </div>
                  <div class="row item">
                    <div class="col-50">
                      <p class="name">年龄</p>
                      <div class="item-input">
                        <input type="text" value="30" id='driverAge' name='driveAge' />
                      </div>
                    </div>
                    <div class="col-50 method-item">
                      <p class="name">预付/到付</p>
                      <div class="item-input">
                        <input type="text" id='method' placeholder="请选择" value="" />
                        <input type="hidden" value="" name="type" />
                      </div>
                    </div>
                  </div>
                  <div class="row item">
                    <div class="col-100 type-item">
                      <p class="name">套餐</p>
                      <div class="item-input set-input">
                        <input type="text" value="" id='package-type' class="" placeholder="选择套餐" />
                        <input type="hidden" value="" name="setCategoryId" />
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="tips-list">
            <p><span class="color-red">*</span>取、还车以当地时间为准</p>
            <p><span class="color-red">*</span>所示价格只适合中国、香港、澳门地区的护照和驾照持有者</p>
            <p><span class="color-red">*</span>若预付订单客户提前还车，未使用天数不予退款</p>
            <p><span class="color-red">*</span>浮动价将不定时更新，常规价为常年适用价格</p>
            <p><span class="color-red">*</span>服务热线：+86-21-63758388</p>
          </div>
          <!-- <div class="tips-list">
            <p><span class="color-red">*</span>取车还车以当地时间为准</p>
            <p><span class="color-red">*</span>本网站所示价格只适合中国或香港澳门地区的护照和驾照持有者</p>
            <p><span class="color-red">*</span>对于预付的任何未使用预定租凭天数，不予退费</p>
            <p><span class="color-red">*</span>浮动价为租车公司根据当前市场销售情况做出不定时的调整更新 价格</p>
            <p><span class="color-red">*</span>常规价为租车公司向销售地区制定的常年适用价格，不随市场 销售情况而调整变化</p>
            <p><span class="color-red">*</span>服务热线：400-500-5000</p>
          </div> -->
        </form>
      </div>
      
      <div class="popup city-popup">
        <header class="bar bar-nav fita-header">
          <a class="button button-link button-nav pull-left close-popup" href="javascript:void(0);">
            <span class="icon icon-left"></span></a>
          <h1 class="title">选择国家</h1>
        </header>
        <div class="content">
	        <div class="cities-letter">
	          <ul>
	            <c:forEach var="item" items="${persist.countries}">
	              <li><a href="javascript: void(0);"  data-name="country">${item.key}</a></li>
	            </c:forEach>
	          </ul>
	        </div>
	        
	        <div class="content-block contacts-country list-wrapper">
	          <div class="list-block no-margin contacts-block city-box">
	            <c:forEach var="item" items="${persist.countries}">
	              <div class="list-group city-list">
	              <ul>
	                <li class="list-group-title" id="country-${item.key}">${item.key}</li>
	                <c:forEach var="country" items="${item.value}">
	                  <li>
	                  <div class="item-content">
	                    <div class="item-inner">
	                      <div class="item-title" data-id="${country.id}" data-code="${country.code}" data-suppliers="${country.suppliers}" data-name="${country.chineseName}">
	                        ${country.chineseName}<small style="font-size: 10px; color: gray;">&nbsp;&nbsp;${country.englishName}</small>
	                      </div>
	                    </div>
	                  </div>
	                </li>
	                </c:forEach>
	              </ul>
	            </div>
	            </c:forEach>
	          </div>
	        </div>
	        
	      </div>
      </div>
      
      <!-- <p>查找可用车辆信息填写页面</p>
      <a ctx.host="/cars-search/cars-search-result">查找结果页</a>
      <a ctx.host="/cars-search/cars-search-location">城市门店查询</a> -->
  
    </div>
    <div class="popup search-page" id='city-search'>
      <header class="bar bar-nav fita-header">
        <a class="button button-link button-nav pull-left back" href="javascript:void(0);">
		      <span class="icon icon-left"></span></a>
        <h1 class="title">取还车城市</h1>
      </header>
      
      <div class="bar bar-header-secondary fita-header-secondary">
        <div class="searchbar">
          <a class="searchbar-cancel">取消</a>
          <div class="search-input">
            <label class="icon icon-search" for="search"></label>
            <input type="search" id='search' placeholder='输入关键字...'/>
          </div>
        </div>
      </div>
		  <div class="content">
		    <div class="search-list-wrap" style="display: none;">
		      <!-- <div class="list-block no-margin">
				    <ul>
				      <li class="item-content">
				        <div class="item-inner">
				          <div class="item-title">
				            <div class="name">名称</div>
				            <div class="description">国家，城市，机场，地址</div>
				          </div>
				          <div class="item-after"></div>
				        </div>
				      </li>
				      <li class="item-content">
				        <div class="item-inner">
				          <div class="item-title">
				            <div class="name">名称</div>
				            <div class="description">国家，城市，机场，地址</div>
				          </div>
				          <div class="item-after"></div>
				        </div>
				      </li>
				    </ul>
				  </div> -->
		    </div>
		    <div class="hot-city-wrap">
		      <div class="content-block hot-city">热门城市机场</div>
          <div class="list-wrapper">
            <div class="city-box">
              <!-- <div class="city-list" id="a">
                <div class="city-index">A</div>
                <div class="cities-name row">
                  <div class="item col-50" data-name="奥克兰" data-id="1">奥克兰<span>Auckland</span></div>
                  <div class="item col-50" data-name="奥克兰" data-id="2">奥克兰<span>Auckland</span></div>
                </div>
              </div>
              <div class="city-list" id="b">
                <div class="city-index">B</div>
                <div class="cities-name row">
                  <div class="item col-50" data-name="奥克兰" data-id="3">奥克兰<span>Auckland</span></div>
                  <div class="item col-50" data-name="奥克兰" data-id="4">奥兰多<span>Auckland</span></div>
                  <div class="item col-50" data-name="奥克兰" data-id="5">奥兰多<span>Auckland</span></div>
                </div>
              </div>
              <div class="city-list" id="c">
                <div class="city-index">C</div>
                <div class="cities-name row">
                  <div class="item col-50" data-name="奥克兰" data-id="6">奥克兰<span>Auckland</span></div>
                  <div class="item col-50" data-name="奥克兰" data-id="7">奥兰多<span>Auckland</span></div>
                  <div class="item col-50" data-name="奥克兰" data-id="8">奥兰多<span>Auckland</span></div>
                </div>
              </div> -->
            </div>
          </div>
          <!-- 索引 -->
          <div class="cities-letter">
            <!-- <ul>
              <li><a href="javascript:void(0);" class="external">A</a></li>
              <li><a href="javascript:void(0);" class="external">B</a></li>
              <li><a href="javascript:void(0);" class="external">C</a></li>
              <li><a href="javascript:void(0);" class="external">D</a></li>
              <li><a href="javascript:void(0);" class="external">E</a></li>
              <li><a href="javascript:void(0);" class="external">F</a></li>
              <li><a href="javascript:void(0);" class="external">G</a></li>
              <li><a href="javascript:void(0);" class="external">H</a></li>
              <li><a href="javascript:void(0);" class="external">I</a></li>
              <li><a href="javascript:void(0);" class="external">J</a></li>
              <li><a href="javascript:void(0);" class="external">K</a></li>
              <li><a href="javascript:void(0);" class="external">L</a></li>
              <li><a href="javascript:void(0);" class="external">M</a></li>
              <li><a href="javascript:void(0);" class="external">Q</a></li>
              <li><a href="javascript:void(0);" class="external">R</a></li>
              <li><a href="javascript:void(0);" class="external">S</a></li>
              <li><a href="javascript:void(0);" class="external">T</a></li>
              <li><a href="javascript:void(0);" class="external">U</a></li>
            </ul> -->
          </div>
        </div>
      </div>
		</div>
    
    <div class="panel-overlay"></div>
    <div class="panel panel-right panel-cover fita-panel">
      <div class="list-block contacts-block no-margin">
        <p class="menu-title close-panel">关闭</p>
          <ul>
            <li>
              <a href="${ctx.host}/cars/search" class="item-content item-link">
                <div class="item-inner">
                  <div class="item-title">立即租车</div>
                </div>
              </a>
            </li>
            <%-- <li>
              <a href="${ctx.host}/orders" class="item-content item-link">
                <div class="item-inner">
                  <div class="item-title">我的订单</div>
                </div>
              </a>
            </li> --%>
            <li>
	            <a href="${ctx.host}/profile" class="item-content item-link">
	              <div class="item-inner">
	                <div class="item-title">个人中心</div>
	              </div>
	            </a>
	          </li>
          </ul>
      </div>
    </div>
  </div>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource type="script" root="${ctx.resource}/build" src="js/page/cars-search/cars-search.js" />
  <script type="text/javascript">
    require(['page/cars-search/cars-search'], function(page) {
      page.init({
        "suppliers": JSON.parse('${persist.suppliersJson}'),
        "sets": JSON.parse('${persist.getSetsJson()}'),
        "setCategories": JSON.parse('${persist.getSetCategoriesJson()}')
      })
    })
  </script>
 
</body>
</html>